package com.cn.wanxi.service;

import com.cn.wanxi.dao.CompanyDao;
import com.cn.wanxi.model.CompanyModel;

public class CompanyService {
    /**
     * 一个完整的方法
     * 权限修饰符 特征修饰符 返回值类型 方法名 （参数） 异常
     * {
     * 执行体
     * return 返回值；
     * }
     */
    public CompanyModel getCompanyModel() {
        //创建一个新的实力类，用于装数据，这个用于返回到页面上的数据
        CompanyModel companyModel = new CompanyModel();
        CompanyDao companyDao = new CompanyDao();//数据层里面的值，用于客户同意修改
        companyModel.setLogo(companyDao.logo);
        companyModel.setPhone(companyDao.phone);
        companyModel.setNet(companyDao.net);
        companyModel.setEmail(companyDao.email);
        companyModel.setLinePhone(companyDao.linePhone);
        companyModel.setAddress(companyDao.address);
        companyModel.setVersion(companyDao.version);
        return companyModel;
    }
}
